#ifndef MATRIX_H
#define MATRIX_H
#include <QVector>
class Matrix
{
public:
    Matrix();
    static double calculateBaseDeterminant(QVector<QVector <double > > matrix);
    static double calculateDeterminant(QVector<QVector <double > > matrix);
    static QVector<QVector <double > > reduceMatrix(QVector<QVector <double > > matrix, int row, int column);
    static QVector<QVector <double > > calculateMatrixOfCofactors(QVector<QVector <double > > matrix);
    static QVector<QVector <double > > calculateTransposedMatrix(QVector<QVector <double > > matrix);
    static QVector<QVector <double > > calculateAdjointMatrix(QVector<QVector <double > > matrix);
    static QVector<QVector <double > > calculateInverseMatrix(QVector<QVector <double > > matrix, double determinant);
    static QVector<QVector <double > > multiplyMatrices(QVector<QVector <double > > matrix1, QVector<QVector <double > > matrix2);
    static bool isInvertible(double determinant);
    static bool isPossibleMultiply(QVector<QVector <double > > matrix1, QVector<QVector <double > > matrix2);
    static double calculateDeterminantByGauss(QVector<QVector <double > > matrix);
    static double calculateInverseMatrixTeste(QVector<QVector <double > > matrix);
    static QVector<QVector <double > >  Inversa(QVector<QVector <double > > matrix);
    //static void  Matrix::Inversa(QVector<QVector <double > > matrix);
    static QVector<QVector <int > > SWAP( QVector<QVector <int > > matrix, int i, int j, int a, int b);

//private:
    //static QVector<QVector <double > > reduceMatrix(QVector<QVector <double > > matrix, int row, int column);
   static QVector<int> getRemovedIndexes(int row, int column, int n);
   static bool indexMustBeRemoved(QVector<int> indexes, int i, int j);


};

#endif // MATRIX_H
